<!doctype html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>雍禾植发</title>
    <script src="js/jquery.min.js"></script>
    <script src="js/rem.js"></script>
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/index001.css">
    <script src="js/clipboard.min.js"></script>
    <style>
        /*  表单最后显示 */
        .container2Msg {
            font-size: 16px;
        }

        .container2Msg div {
            margin: 10px 0;
        }

        .container2Msg b {
            display: block;
            width: 100%;
            line-height: 32px;
            background: #16b5ec;
            color: white;
            font-size: 20px;
            letter-spacing: 2px;
            border-radius: 4px;
        }

        .container2Msg div span {
            float: left;
            text-align-last: justify;
            width: 1.60rem;
            font-weight: bolder;
        }

        .container2Msg div i {
            font-style: normal;
        }

        .container2Msg div input {
            float: right;
            width: calc(100% - 2.00rem);
            height: 30px;
            border: 1px solid #16b5ec;
            border-radius: 4px;
            text-indent: 1em;
            color: #000 !important;
        }

        .container2Btn {
            display: block;
            width: 84%;
            line-height: 40px;
            background: #16b5ec;
            color: #fff600;
            font-size: 16px;
            border-radius: 20px;
            margin: 30px auto 10px;
        }

        .container2Btn span {
            font-size: 20px;
            font-weight: bolder;
        }
    </style>
    <script>
        (function (w, d, t, s, q, m, n) {
            if (w.utq) return;
            q = w.utq = function () {
                q.process ? q.process(arguments) : q.queue.push(arguments);
            };
            q.queue = [];
            m = d.getElementsByTagName(t)[0];
            n = d.createElement(t);
            n.src = s;
            n.async = true;
            m.parentNode.insertBefore(n, m);
        })(window, document, 'script', 'https://image.uc.cn/s/uae/g/0s/ad/utracking.js');
        utq('set', 'convertMode', true);
        utq('set', 'trackurl', 'huichuan.sm.cn/lp');
    </script>
    <script>
        var _defaultNum = "tuofazhifa666";
    </script>
</head>

<body>
    <div class="box" style="display: block;height: 41.6rem;">
        <img src="images001/topImg001.png" height="1214" width="750" />

        <!-- 您的性别 -->
        <div class="questionBox" data-top="1" data-text="您的性别" style="height: 7.00rem">
            <div class="work-intro">
                <div class="title">
                    <h2 class="title-text"><span>您的性别</span></h2>
                </div>
            </div>
            <div class="one">
                <div class="two">
                    <div class="three">
                        <img src="images001/checkImg.png" class="checkImg" height="87" width="111" />
                        <img src="images001/Q1_1.png" height="356" width="309" />
                        <span>男</span>
                    </div>
                    <div class="change">
                        <div class="btn" data-question="1" data-data="男">点击选择</div>
                    </div>

                </div>
                <div class="two">
                    <div class="three">
                        <img src="images001/checkImg.png" class="checkImg" height="87" width="111" />
                        <img src="images001/Q1_2.png" height="356" width="309" />
                        <span>女</span>
                    </div>
                    <div class="change">
                        <div class="btn" data-question="1" data-data="女">点击选择</div>
                    </div>

                </div>
            </div>

        </div>

        <!-- 您的年龄 -->
        <div class="questionBox age" data-top="2" data-text="您的年龄" style="height: 4.40rem">
            <div class="work-intro">
                <div class="title">
                    <h2 class="title-text"><span>您的年龄</span></h2>
                </div>
            </div>
            <div class="one" style="margin-bottom: 0;">
                <div class="two">
                    <div class="change" style="margin-top: 0;">
                        <img src="images001/checkImg.png" class="checkImg" height="87" width="111" />
                        <span>20岁以下</span>
                        <div class="btn" data-question="2" data-data="20岁以下">点击选择</div>
                    </div>
                </div>
                <div class="two">
                    <div class="change" style="margin-top: 0;">
                        <img src="images001/checkImg.png" class="checkImg" height="87" width="111" />
                        <span>20岁-30岁</span>
                        <div class="btn" data-question="2" data-data="20岁-30岁">点击选择</div>
                    </div>
                </div>
            </div>
            <div class="one" style="margin-top: 0;">
                <div class="two">
                    <div class="change" style="margin-top: 0;">
                        <img src="images001/checkImg.png" class="checkImg" height="87" width="111" />
                        <span>30岁-45岁</span>
                        <div class="btn" data-question="2" data-data="30岁-45岁">点击选择</div>
                    </div>
                </div>
                <div class="two">
                    <div class="change" style="margin-top: 0;">
                        <img src="images001/checkImg.png" class="checkImg" height="87" width="111" />
                        <span>45岁以上</span>
                        <div class="btn" data-question="2" data-data="45岁以上">点击选择</div>
                    </div>
                </div>
            </div>


        </div>

        <!-- 目前脱发部位 -->
        <div class="questionBox" data-top="3" data-text="目前脱发部位" style="height: 12.20rem">
            <div class="work-intro">
                <div class="title">
                    <h2 class="title-text"><span>目前脱发部位</span></h2>
                </div>
            </div>
            <div class="one">
                <div class="two">
                    <div class="three">
                        <img src="images001/checkImg.png" class="checkImg" height="87" width="111" />
                        <img src="images001/Q2_1.png" height="356" width="309" />
                        <span>前额脱发</span>
                    </div>
                    <div class="change">
                        <div class="btn" data-question="3" data-data="前额脱发">点击选择</div>
                    </div>

                </div>
                <div class="two">
                    <div class="three">
                        <img src="images001/checkImg.png" class="checkImg" height="87" width="111" />
                        <img src="images001/Q2_2.png" height="356" width="309" />
                        <span>额角脱发</span>
                    </div>
                    <div class="change">
                        <div class="btn" data-question="3" data-data="额角脱发">点击选择</div>
                    </div>

                </div>
            </div>
            <div class="one">
                <div class="two">
                    <div class="three">
                        <img src="images001/checkImg.png" class="checkImg" height="87" width="111" />
                        <img src="images001/Q2_3.png" height="356" width="309" />
                        <span>头顶脱发</span>
                    </div>
                    <div class="change">
                        <div class="btn" data-question="3" data-data="头顶脱发">点击选择</div>
                    </div>

                </div>
                <div class="two">
                    <div class="three">
                        <img src="images001/checkImg.png" class="checkImg" height="87" width="111" />
                        <img src="images001/Q2_4.png" height="356" width="309" />
                        <span>普通脱发</span>
                    </div>
                    <div class="change">
                        <div class="btn" data-question="3" data-data="普通脱发">点击选择</div>
                    </div>

                </div>
            </div>

        </div>


        <!-- 是否用过以下方法治疗 -->
        <div class="questionBox" data-top="5" data-text="是否用过以下方法治疗" style="height: 5.50rem">
            <div class="work-intro">
                <div class="title">
                    <h2 class="title-text"><span>是否用过以下方法治疗</span></h2>
                </div>
            </div>
            <div class="one">
                <div class="two">
                    <div class="three" style="padding: 0;border: none;">
                        <img src="images001/checkImg.png" class="checkImg" height="87" width="111" style="bottom: 0;" />
                        <img src="images001/Q4_2.jpg" height="356" width="309" />
                    </div>
                    <div class="change">
                        <div class="btn" data-question="4" data-data="药物治疗">点击选择</div>
                    </div>

                </div>
                <div class="two">
                    <div class="three" style="padding: 0;border: none;">
                        <img src="images001/checkImg.png" class="checkImg" height="87" width="111" style="bottom: 0;" />
                        <img src="images001/Q4_1.jpg" height="356" width="309" />
                    </div>
                    <div class="change">
                        <div class="btn" data-question="4" data-data="偏方治疗">点击选择</div>
                    </div>

                </div>
            </div>
        </div>

        <div class="nextBtn wx_hm" onclick="checkBtn()">点击提交</div>


    </div>
    <script>


        /*
        *
        *  跳转微信函数 加在要跳转的按钮上
        *
        * */
        var goweixin = function () {


            //区域营销-华东-许德全
            utq('track', 'FormSubmit', '603079');

            window.location.href = "weixin://";


        };

        //答案数组
        var _answerArr = [1, 2, 3, 4],    //选择答案数组填充
            _ind,   //数组填充用户选择位置
            _data,  //数组填充用户当前选择值
            _tipText, //提示信息
            _trueNum;  //正确跳出标准
        /*
        *
        * 点击选择 逻辑
        *
        * */
        $(".two .btn").each(function () {
            $(this).on("click", function () {
                $(this).css("background", "#7ea3cc");
                $(this).parent().parent().siblings().find(".btn").css("background", "#707070");      //同级
                $(this).parent().parent().parent().siblings().find(".btn").css("background", "#707070");  //父级

                $(this).parent().parent().find(".checkImg").show();
                $(this).parent().parent().siblings().find(".checkImg").hide();       //同级
                $(this).parent().parent().parent().siblings().find(".checkImg").hide();    //父级


                //添加到答案数组里
                _ind = $(this).attr("data-question");
                _data = $(this).attr("data-data");
                _answerArr[_ind - 1] = _data;


            });
        });

        /*
        *
        * 数据选项判断
        *
        * */

        //滚动到未选择的位置
        var Roll = function (ind) {
            $("html,body").animate({
                scrollTop: ($('.questionBox').eq(ind).offset().top) + "px"
            }, 500);
        };


        var checkBtn = function () {


            console.log(_answerArr)
            if (_answerArr[0] === 1) {
                Roll(0);
                alert("请选择【" + $('.questionBox').eq(0).attr("data-text") + "】");
                _trueNum = 0;
            } else if (_answerArr[1] === 2) {
                Roll(1);
                alert("请选择【" + $('.questionBox').eq(1).attr("data-text") + "】");
                _trueNum = 0;
            } else if (_answerArr[2] === 3) {
                Roll(2);
                alert("请选择【" + $('.questionBox').eq(2).attr("data-text") + "】");
                _trueNum = 0;
            } else if (_answerArr[3] === 4) {
                Roll(3);
                alert("请选择【" + $('.questionBox').eq(3).attr("data-text") + "】");
                _trueNum = 0;
            } else {
                showReport();
            }


        }
    </script>

    <!-- 表单最后显示 -->
    <div class="container2"
        style="width: 100%; height: auto; background: rgb(31, 182, 227); box-sizing: border-box; padding: 0px 10px 10px; font-size: 16px; line-height: 26px; white-space: nowrap;display: none;max-width: 500px;margin: 0 auto;">
        <img src="images001/resultTop002.jpg" height="186" width="426" style="width: 100%;height: auto;display: block;">
        <div class="container2Main"
            style="width: 100%;height: auto;background: white;text-align: center;border-radius: 10px;box-sizing: border-box;padding: 0 0 20px 0">
            <br>
            <p
                style="white-space: normal;width: 96%;text-indent: 2em;text-align: left;margin:0 auto ;font-size: 14px;line-height: 20px;">
                您的脱发报告已生成,报告将会自动发送到老师微信,现在添加老师微信,发送您的头部脱发照片；老师会根据你的脱发报告，更具针对性的帮你进行深入分析</p>
            <div class="container2Msg" style="width: 84%;margin: 10px auto;">
                <b>常规检查项</b>
                <div>
                    <span>性别</span><i>：</i><input type="text" disabled="">
                </div>
                <div>
                    <span>年龄</span><i>：</i><input type="text" disabled="">
                </div>
                <div>
                    <span>脱发部位</span><i>：</i><input type="text" disabled="">
                </div>
                <div>
                    <span style="transform: scale(0.84,1);transform-origin: 0 0;">曾用治疗方法</span><i>：</i>
                    <input type="text" disabled="">
                </div>
            </div>
            <div class="container2Btn" onclick="goweixin();">点击添加微信：<span>
                    <script>document.write(_defaultNum)</script>
                </span>
            </div>
            <div class="tips" style="font-size: 12px;">注：过程中无任何收费项目，并免费赠送毛囊检测名额</div>
            <p style="font-size: 12px;line-height: 20px">合肥雍禾整形外科门诊部有限公司 皖ICP备19011090号-2 <br>
                (合)医广【2020】第10-19-122号</p>
        </div>
    </div>

    <script>
        /*
        *
        * 赋值并显示表单函数
        *
        * */
        function showReport() {
            $(".container2Msg input").each(function (ind) {
                $(this).val(_answerArr[ind]);
            });
            $('.box').hide();
            $('.container2').show();
            $('.container3').show();
        }

        var clipboard = new ClipboardJS(".wx_hm", {
            text: function () {
                return "tuofazhifa666";
            }
        });

        clipboard.on('success', function () {
            console.log('复制成功');
        });
        clipboard.on('error', function () {
            console.log('复制失败');
        });

    </script>


</body>

</html>